<!DOCTYPE html>
<html>
<head>
	<title>修改部门信息</title>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<script type="text/javascript" src="__PUBLIC__/hdjs/jquery-1.11.3.min.js"></script>
    <link rel="stylesheet" href="__PUBLIC__/hdjs/hdjs.css"/>
    <script type="text/javascript" src="__PUBLIC__/hdjs/hdjs.min.js"></script>
	<link href="__PUBLIC__/css/mine.css" type="text/css" rel="stylesheet" />
</head>
<body>
	<div class="div_head">
		<span>
			<span style="float: left;">当前位置是：用户管理 >>修改部门信息</span>
			<span style="float: right; margin-right: 8px; font-weight: bold;">
				<a style="text-decoration: none;" href="{:U('add')}">【添加部门】</a>
			</span>
		</span>
	</div>
	<div class="hd-w500" style="padding:20px;margin:0 auto">
	<form name="form1" method="post" action="__SELF__">
	<input name="id" type="hidden" value="{$bm_info.id}" />
		<table class="hd-table hd-table-form hd-form">
		<thead>
        <tr>
          <th colspan="2">修改【{$bm_info.name}】的信息</th>
        </tr>
		</thead>
        <tr>
          <td>选择上级部门：</td>
          <td><select name="pid" class="hd-w200">
            <option value="0">顶级部门</option>
          <volist name='bm_list' id='vo'>
			<if condition="$vo['id'] eq $bm_info['pid']">
            <option value="{$vo.id}" selected="selected">{$vo.html}{$vo.name}</option>
			<else />
				<option value="{$vo.id}">{$vo.html}{$vo.name}</option>
			</if>
          </volist>
          </select></td>
        </tr>
        <tr>
          <td>部门名称：</td>
          <td><input name="name" type="text" class="hd-w200" value="{$bm_info.name}" /></td>
        </tr>
        <tr>
          <td>部门负责人：</td>
          <td><input name="fzr" type="text" class="hd-w200" value="{$bm_info.fzr}" /></td>
        </tr>
        <tr>
          <td colspan="2" align="center"><input type="submit" class="hd-btn hd-btn-default" value="提交" /></td>
        </tr>
      </table>
    </form>
	</div>
<!--表单验证Start-->
<script>
    $(function () {
        $('form').validate({
            name: {
                rule: {
                    required: true
                },
                error: {
                    required: '部门名称不能为空'
                },
                success: '验证通过',
                message: '请输入部门名称'
            },
        })
    })
</script>
<!--表单验证End-->
    </body>
</html>
